<?php

	//echo mt_getrandmax().'<br />';
	foreach (glob("./globdir/*.sql",GLOB_NOSORT) as $filename) 
	{
		//echo "$filename size " . filesize($filename) . "<br />";
		//$sourceFile = $filename;
		$destFile = './globdir/'.mt_rand().'.sql';
		
		rename($filename,$destFile);		
		echo $filename . '被重命名为' . $destFile . '<br />';
	}
?> 